Component({
	options: {
		multipleSlots: true,
		"styleIsolation": "apply-shared"
	},
	relations: {
		'/components/b-tabs/b-tab-panel/b-tab-panel': {
			type: 'child'
		}
	},
	properties: {
		pickValue: { // 选中值
			type: null,
			value: null
		}
	},
	data: {
		tabs: []
	},
	methods: {
		// 选项卡点击切换
		itemClick(e){
			this.setData({
				pickValue: e.target.dataset.id
			})
			let nodes = this.getRelationNodes('/components/b-tabs/b-tab-panel/b-tab-panel')
			nodes.map(item => {
				item.changePickValue()
			})
		}
	},
	ready(){
		let nodes = this.getRelationNodes('/components/b-tabs/b-tab-panel/b-tab-panel')
		this.setData({
			tabs: nodes.map( item => item.data)
		})
	},
	attached(){
		
	}
})
